home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / dev / gui / FoxGuiLibs.lha / foxgui.h < prev    next >
C/C++ Source or Header  |  2000-04-10  |  37KB  |  920 lines

  1. #define FOXCONSOLE
  2.  
  3. #include <exec/types.h>
  4. #include <stdio.h>
  5. #include <utility/tagitem.h>
  6. #include <intuition/intuition.h>
  7.  
  8. #ifdef CPPSOURCE
  9.     #define EXTC extern "C"
  10. #else
  11.     #define EXTC
  12. #endif
  13.  
  14. #ifdef __STORM__
  15.     #define __far
  16.     #define __asm
  17.     #define __stdargs
  18.     #define CALLBACK
  19.     #define I_CALLBACK
  20.     #define STORM_CALLBACK __saveds
  21. #else
  22.     #define STORM_CALLBACK
  23.     #ifdef CPPSOURCE
  24.         #define I_CALLBACK __stdargs
  25.         #define CALLBACK __stdargs __saveds
  26.     #else
  27.         #define I_CALLBACK __far __stdargs
  28.         #define CALLBACK __far __stdargs __saveds
  29.     #endif
  30. #endif
  31.  
  32.  
  33. #define VAL_SPC  (char)32             /*   Space character               */
  34. #define VAL_CR   (char)13             /*   Carriage return character     */
  35. #define VAL_LF   (char)10             /*   Line feed character           */
  36. #define VAL_BS   (char)8              /*   Back Space character          */
  37. #define VAL_ESC  (char)27             /*   Escape character              */
  38. #define VAL_DEL  (char)127            /*   Delete key (not del char)     */
  39. #define VAL_CSI   (int)155            /*   Control sequence introducer   */
  40.  
  41. // Use on function prototypes
  42. #define PROTOFOXLIB __far __asm
  43. // Use on actual functions
  44. #define FOXLIB __far __asm __saveds
  45.  
  46. #define REGA0    register __a0
  47. #define REGA1    register __a1
  48. #define REGA2    register __a2
  49. #define REGA3    register __a3
  50. #define REGD0  register __d0
  51. #define REGD1  register __d1
  52. #define REGD2  register __d2
  53. #define REGD3  register __d3
  54. #define REGD4  register __d4
  55. #define REGD5  register __d5
  56. #define REGD6  register __d6
  57. #define REGD7  register __d7
  58. #define REGFP0  register __fp0
  59. #define REGFP1  register __fp1
  60. #define REGFP2  register __fp2
  61. #define REGFP3  register __fp3
  62. #define REGFP4  register __fp4
  63. #define REGFP5  register __fp5
  64. #define REGFP6  register __fp6
  65. #define REGFP7  register __fp7
  66.  
  67. #define FrameTypeID 1
  68. #define ButtonTypeID 2
  69. #define TabControlTypeID 3
  70. #define ListBoxTypeID 4
  71. #define TreeControlTypeID 5
  72. #define DDListBoxTypeID 6
  73. #define EditBoxTypeID 7
  74. #define OutputBoxTypeID 8
  75. #define ProgressBarTypeID 9
  76. #define TickBoxTypeID 10
  77. #define RadioButtonTypeID 11
  78. #define WindowTypeID 12
  79. #define ScreenTypeID 13
  80. #define TimerTypeID 14
  81.  
  82. #define ET_RAWKEY      1
  83. #define ET_RAWMOUSE    2
  84. #define ET_EVENT       3
  85. #define ET_POINTPOS    4
  86. #define ET_TIMER       6
  87. #define ET_GADGPRESS   7
  88. #define ET_GADGRELEASE 8
  89. #define ET_REQACT      9
  90. #define ET_MENUNUM    10
  91. #define ET_GADGCLOSE  11
  92. #define ET_WINDOWSIZE 12
  93. #define ET_WINDOWREF  13
  94. #define ET_PREFCHANGE 14
  95. #define ET_DISKREMOVE 15
  96. #define ET_DISKINSERT 16
  97.  
  98. struct Console
  99.    {
  100.    struct MsgPort  *RePort, *WrPort;
  101.    struct IOStdReq *ConIn,  *ConOut;
  102.    };
  103.  
  104. void PROTOFOXLIB GetConsoleError(REGA1 char *details);
  105. void PROTOFOXLIB CloseConsole(REGA0 struct Console *con);
  106. int PROTOFOXLIB OpenConsole(REGA0 struct Console *con, REGA1 struct Window *win, REGA2 char *name);
  107. void PROTOFOXLIB ConPutChar(REGA0 struct Console *con, REGD0 char ch);
  108. void PROTOFOXLIB QueueRead(REGA0 struct Console *con, REGA1 UBYTE *whereto);
  109. LONG PROTOFOXLIB ConMayGetChar(REGA0 struct Console *con, REGA1 UBYTE *whereto);
  110. char PROTOFOXLIB ConGetChar(REGA0 struct Console *con, REGA1 UBYTE *ibuf);
  111. void PROTOFOXLIB ConPrint(REGA0 struct Console *con, REGA1 char *String);
  112. void PROTOFOXLIB ConClear(REGA0 struct Console *con);
  113. void PROTOFOXLIB ConHome(REGA0 struct Console *con);
  114. void PROTOFOXLIB ConBlankToEOL(REGA0 struct Console *con);
  115. void PROTOFOXLIB ConTab(REGA0 struct Console *con, REGD0 int x, REGD1 int y);
  116. void PROTOFOXLIB ConPrintTab(REGA0 struct Console *con, REGD0 int x, REGD1 int y, REGA1 char *str);
  117. void PROTOFOXLIB ConWrapOff(REGA0 struct Console *con);
  118. void PROTOFOXLIB ConWrapOn(REGA0 struct Console *con);
  119. void PROTOFOXLIB ConHideCursor(REGA0 struct Console *con);
  120. void PROTOFOXLIB ConShowCursor(REGA0 struct Console *con);
  121. void PROTOFOXLIB ConPrintHi(REGA0 struct Console *con, REGA1 char *text, REGD0 int col);
  122.  
  123. void spc(FILE *outfp, int spaces);
  124. char *RightAlignString(char *str, int lenstr, BOOL commas);
  125. void PROTOFOXLIB SetSeed(REGD0 int Seed);
  126. int PROTOFOXLIB Random(REGD0 int limit);
  127.  
  128. // Screens
  129. #define GS_AUTOSCROLL        2
  130. #define GS_DISPLAY_ID        4
  131. #define GS_OVERSCAN            8
  132. #define GS_PENS                16
  133. #define GS_INTERLACE            32
  134. #define GS_CLONEFONT            64
  135. #define GS_CLONEPENS            128
  136.  
  137. // Windows
  138. #define GW_DRAG                1
  139. #ifdef OLD_LISTS
  140. #define LIST_UPDATE_OFF        0
  141. #define LINE_SCROLL            2
  142. #define PAGE_SCROLL            4
  143. #define LIST_UPDATE_ON        8
  144. #endif
  145. #define GW_CONSOLE            16
  146. #define GW_DEPTH                32
  147. #define GW_CLOSE                64
  148. #define GW_BORDERLESS        128
  149. #define GW_SIZE                256
  150. #define GW_DROP                512
  151. #define GW_BACKDROP            1024
  152. #define GW_ACTIVE                2048
  153. #define GW_DISKIN                4096
  154. #define GW_DISKOUT            8192
  155.  
  156. #define ASCENDING                1
  157. #define DESCENDING            2
  158. #define NUM_ASCENDING        4
  159. #define NUM_DESCENDING        8
  160. #define IGNORE_CASE            16
  161.  
  162. #define GUI_CANCEL        8
  163. #define GUI_MODAL_END    4
  164. #define GUI_END            2
  165. #define GUI_CONTINUE        1
  166.  
  167. // For all controls (but not windows)
  168. #define S_AUTO_SIZE            128
  169. #define S_FONT_SENSITIVE    8192
  170.  
  171. // Edit boxes
  172. #define TEXT_EDIT                0
  173. #define INT_EDIT                1
  174. #define FLOAT_EDIT            2
  175. #define NO_EDIT                4
  176. #define EB_CLEAR                8
  177. #define THREED                    64
  178. //      S_AUTO_SIZE            128
  179.  
  180. // Drop-down list boxes
  181. #define DD_CLEAR                EB_CLEAR
  182.  
  183.  
  184. // Output boxes
  185. #define NO_BORDER                1
  186. #define JUSTIFY_LEFT            2
  187. #define JUSTIFY_CENTRE        4
  188. #define JUSTIFY_RIGHT        8
  189. #define OB_POST                16
  190. #define OB_PRE                    32
  191. //      THREED                    64
  192. //      S_AUTO_SIZE            128
  193. //      S_FONT_SENSITIVE    8192
  194.  
  195. // List Boxes
  196. #define LB_CLIPPED                    1 // Set if ListBoxClipOn() has been called with no matching ListBoxClipOff()
  197. #define SYS_LB_VSCROLL                2
  198. #define LB_DBLCLICK                    4
  199. #define LB_DRAG                        8
  200. #define LB_DROP                        32
  201. #define SYS_LB_HSCROLL                64
  202. //      S_AUTO_SIZE                    128
  203. #define LB_CURSOR                        256
  204. #define LB_SELECT                        512
  205. #define LB_REHILIGHT_ON_SCROLL    1024
  206.  
  207. // Tree Controls
  208. #define TC_CLIPPED                    LB_CLIPPED
  209. #define SYS_TC_VSCROLL                SYS_LB_VSCROLL
  210. #define TC_DBLCLICK                    LB_DBLCLICK
  211. #define TC_DRAG                        LB_DRAG
  212. #define TC_DRAGIMAGE                    LB_DRAGIMAGE
  213. #define TC_DROP                        LB_DROP
  214. #define SYS_TC_HSCROLL                SYS_LB_HSCROLL
  215. #define TC_CURSOR                        LB_CURSOR
  216. #define TC_SELECT                        LB_SELECT
  217. #define TC_REHILIGHT_ON_SCROLL    LB_REHILIGHT_ON_SCROLL
  218. #define TC_CLOSEITEM                    2048
  219. #define TC_OPENITEM                    4096
  220.  
  221. // Tree Items
  222. #define TI_OPEN                1
  223. #define TI_BITMAPISSCALED    2
  224.  
  225. // Tick boxes/Radio buttons
  226. #define BG_CLEAR                1
  227. #define BG_SELECTED            64
  228. //      S_AUTO_SIZE            128
  229.  
  230. // Buttons
  231. #define BN_STD                    0        /* Standard button    */
  232. #define BN_CLEAR                1
  233. #define BN_AR                    2        /* Auto repeat button */
  234. #define BN_CANCEL                4        // A Cancel button can be activated by pressing the escape key.
  235. #define BN_OKAY                8        // An Okay button can be activated by pressing the return key.
  236. //      S_AUTO_SIZE            128
  237. #define SYS_BN_HIDDEN        256
  238. //      S_FONT_SENSITIVE    8192
  239.  
  240. // Images
  241. #define BM_STUPID            0 // Opposite of BM_SMART
  242. #define BM_OVERLAY        1
  243. #define BM_SCALE            2
  244. #define BM_CLIP            4
  245. #define BM_SMART            8
  246.  
  247. // Frames
  248. #define FM_CLEAR            BN_CLEAR
  249. #define FM_LBUT            2
  250. #define FM_RBUT            4
  251. #define FM_DRAG            8
  252. #define FM_DROP            32
  253. #define FM_BORDERLESS    64
  254. //      S_AUTO_SIZE        128
  255. #define FM_DRAGOUTLINE    256
  256. #define FM_SIZEOUTLINE    512 // For use by FoxEd only.
  257. #define SYS_FM_ROUNDED    1024
  258.  
  259. // Tab controls
  260. #define TC_CLEAR            FM_CLEAR
  261. #define TC_FOXED            2
  262.  
  263. // Timers
  264. #define TM_SECOND            1
  265. #define TM_MINUTE            2
  266.  
  267. // Misc.
  268. #define FAST_MALLOCS        1
  269. #define GM_YES                1
  270. #define GM_OKAY            1
  271. #define GM_NO                2
  272. #define GM_CANCEL            4
  273. #define GM_EXCLAMATION    8
  274. #define GM_QUESTION        16
  275. #define GM_X                32
  276. #define GM_STOP            64
  277. #define GM_CROSSBONES    128
  278. #define GM_INFORMATION    256
  279.  
  280. // Progress bars
  281. #define PB_RAISED                        0
  282. #define PB_INSET                        1
  283. #define PB_CAPTION_CENTRE            2
  284. #define PB_CAPTION_TOP_LEFT        4
  285. #define PB_CAPTION_BOTTOM_LEFT    8
  286. #define PB_CAPTION_TOP_RIGHT        0
  287. #define PB_CAPTION_BOTTOM_RIGHT    16
  288. #define PB_FILL_LR                    0
  289. #define PB_FILL_BT                    32
  290. //      S_AUTO_SIZE                    128
  291.  
  292. /***************************************************************
  293.  *                        Macros                               *
  294.  ***************************************************************/
  295.  
  296. #define GuiFree(p)              GuiFreeMem(p,__LINE__,__FILE__)
  297.  
  298. #ifdef FOXGUI
  299.    #define EXT
  300.     char LastErr[256];
  301.     char LastErrFile[256];
  302.     int LastErrLine = 0;
  303. #else
  304.    #define EXT extern
  305.     extern char *LastErr;
  306.     extern char *LastErrFile;
  307.     extern int LastErrLine;
  308. #endif
  309.  
  310. #define NUM_WB_PENS 12
  311.  
  312. typedef struct
  313.     {
  314.     int left, top, width, height;
  315.     int *TabStop;
  316.     } OriginalSize;
  317.  
  318. typedef struct WidgetStruct
  319. {
  320.     char                *ObjectType;             // Type of control.
  321.     void                *Parent;                 // Container (Window or Frame) (For Windows, this will point to the Screen).
  322.     OriginalSize        *os;                     // Original size data for resizable controls.
  323.     int                 left, top;           // For font sensitive controls, left/top will be a multiple of the font width/height and
  324.     int                 width, height;       // fs_left/fs_top are the remainders so the actual left is (left * font_width) + fs_left
  325.     long                flags;                     // Need to keep a copy of the flags because not everything can be handled directly by the gadget.
  326.     void                *NextWidget;             // Next child of same Parent.
  327.     void                *ChildWidget;         // First control that this contains OR pointer to another control which makes up part of
  328.                                                          // this control.  E.g. pointer to OutputBox used for pre/post text.
  329.     void                *ParentControl;      // If this control is part of another control (e.g. if this is an outputbox used for
  330.                                                          // pre/post text on another control) then this points to that control.  Otherwise NULL.
  331. //    int                 fs_left, fs_top;     // For font sensitive controls, left/top will be a multiple of the font width/height and
  332.                                             // fs_left/fs_top are the remainders so the actual left is (left * font_width) + fs_left
  333. //    int                 fs_width, fs_height; // As for fs_left/fs_top
  334. } Widget;
  335.  
  336. typedef struct GuiScrStruct
  337.    {
  338.     Widget *WidgetData; // Do not move this item!  It must be first to match other controls.
  339.    struct Screen    *scr;
  340.    struct ExtNewScreen *nsc;
  341.     struct TagItem *Screen_Tags;
  342.     char   *PubName;
  343.     UWORD  Pens[NUM_WB_PENS + 1];
  344.     int    I_CALLBACK (* STORM_CALLBACK LastWinFn)(struct GuiScrStruct *);
  345.     BYTE   LastWinSig;
  346.     struct GuiScrStruct *NextScr;
  347.    } GuiScreen;
  348.  
  349. struct ListElement
  350.    {
  351.    int                        Itemnum;
  352.    char                        *string;
  353.    struct ListElement    *Next;
  354.    struct EditBoxStruct    *Child;
  355.    };
  356.  
  357. typedef struct GWS
  358.    {
  359.     Widget            *WidgetData; // Do not move this item!  It must be first to match other controls.
  360.     /*    Normally, we could get to the screen structure via the GuiScreen structure (i.e.
  361.         win->WidgetData->Parent->scr) but in the case of a window opened on another applications public screen,
  362.         the ParentGuiScr will be NULL so we need another handle directly onto the Screen structure, hence
  363.         ParentScreen below. */
  364.     /* Actually we don't need it at all because we can get it from the Window structure
  365.         (gw->Win->WScreen) but never mind! */
  366.     struct Screen        *ParentScreen;
  367.    struct Console        *Con;
  368.    struct Window        *Win;
  369.    struct NewWindow    NewWin;
  370.    unsigned long        ConReadSig, WindowSig;
  371.     int                    I_CALLBACK (* STORM_CALLBACK EventFn)(struct GWS*, int, int, int, void*);
  372.     int                    I_CALLBACK (* STORM_CALLBACK MenuFn)(struct GWS*, struct MenuItem*);
  373.     BOOL                    Enabled, Sleep, OldStatus, SysStatus;
  374.    struct GWS            *next, *previous;
  375.     struct Menu            *FirstMenu;
  376.     struct Requester    Request;
  377.    } GuiWindow;
  378.  
  379. typedef struct IntuiText ListBoxItem;
  380.  
  381. typedef struct
  382.     {
  383.     short points[20];
  384.     struct Border DarkBorder, LightBorder;
  385.     struct PB *ScrollUp, *ScrollDown;
  386.     struct Gadget ScrollGad;
  387.     struct PropInfo ScrollGadInfo;
  388.     struct Image ScrollGadImage;
  389.     } Scroller;
  390.  
  391. typedef struct GBMstruct
  392.     {
  393.     unsigned short width, height, depth;
  394.     short  flags;
  395.     struct BitMap *bm;
  396.     struct BMIstruct *bmi; // Only used when the bitmap is on a control.  Otherwise NULL.
  397.     struct GBMstruct *obm; // Points to the original bitmap when on a resizable control.  Otherwise NULL.
  398.     struct GBMstruct *next;
  399.     } GuiBitMap;
  400.  
  401. typedef struct BMIstruct
  402.     {
  403.     GuiWindow *win;
  404.     unsigned short left, top;
  405.     GuiBitMap *bm;
  406.     } BitMapInstance;
  407.  
  408. typedef struct TreeItemS
  409. {
  410.     struct ListBoxStruct *treecontrol;
  411.     struct IntuiText it;
  412.     struct TreeItemS *next, *firstchild, *parent;
  413.     struct PB *plusminus;
  414.     short points[6];
  415.     struct Border LineToParent;
  416.     short flags;
  417.     GuiBitMap *bm;
  418.     BitMapInstance *bmi;
  419.     void *itemdata;
  420. } TreeItem;
  421.  
  422. typedef struct ListBoxStruct
  423.     {
  424.     Widget *WidgetData; // Do not move this item!  It must be first to match other controls.
  425.     struct GWS *Win;
  426.     struct Border DarkBorder, LightBorder, UpArrow, DownArrow, TitleLightBorder, TitleDarkBorder;
  427.     struct Border plus, minus; // Tree Control only
  428.     short points[20], titlebevelpoints[20], hidden;
  429.     int FrontPen;
  430.     int xOffset;
  431.     int LBorder, TBorder;
  432.     int NoItems, NoTitles;
  433.     int MaxIntuiLen, LongestIntuiLen, TopShown;
  434.     ListBoxItem *FirstTitle, *FirstItem, *HiItem;    // List Box only
  435.     TreeItem *itemlist, *topshown, *hiitem;            // Tree Control only
  436.     int HiNum;
  437.     struct TextAttr *Font;
  438.     Scroller *LR, *UD;
  439.     int *TabStop;
  440.     BOOL modified; // Has the list box been modified since it was last refreshed?
  441.     BOOL Enabled;
  442.     struct ListBoxStruct *NextListBox;
  443.     int I_CALLBACK (* STORM_CALLBACK Eventfn) (struct ListBoxStruct*, short, int, void**);
  444.     unsigned short *DragPointer;
  445.     short PointerWidth, PointerHeight, PointerXOffset, PointerYOffset;
  446.     void *DragData;
  447.     } ListBox;
  448.  
  449. typedef struct ListBoxStruct TreeControl;
  450.  
  451. typedef struct FrameStruct
  452.     {
  453.     // The first three items must not be moved.  They match the first five items in the PushButton struct.
  454.     Widget             *WidgetData;
  455.     struct Gadget      button;
  456.     GuiBitMap          *bitmap;
  457.     // Okay to move anything below this point.
  458.     struct IntuiText   text;
  459.     char               *t;
  460.     struct Border      light, dark;
  461.     short              points[28], *cbCopy, hidden;
  462.     int                I_CALLBACK (* STORM_CALLBACK Callfn) (struct FrameStruct*, short, short, short, void**);
  463.     BOOL               Active;
  464.     unsigned short     *DragPointer;
  465.     short              PointerWidth, PointerHeight, PointerXOffset, PointerYOffset;
  466.     void               *DragData;
  467.     struct FrameStruct *next;
  468.     } Frame;
  469.  
  470. typedef struct PB
  471.    {
  472.     // The first three items must not be moved.  They match the first five items in the Frame struct.
  473.     Widget           *WidgetData;
  474.    struct Gadget    button;
  475.     GuiBitMap        *bitmap;
  476.     // Okay to move anything below this point.
  477.    struct IntuiText text1, text2, text3;
  478.     char             *t1, t2[2], *t3;
  479.     struct TextAttr  *ULfont;
  480.    struct Border    light, dark;
  481.    struct Border    slight, sdark;
  482.     short            points[12], *cbCopy, hidden;
  483.    int              I_CALLBACK (* STORM_CALLBACK Callfn) (struct PB*);
  484.     int              I_CALLBACK (* STORM_CALLBACK Filefn) (char*, char*);
  485.    char             Key1, Key2;
  486.    BOOL             Active, OldStatus, SysStatus;
  487.    struct PB        *Next;
  488.    } PushButton;
  489.  
  490. typedef struct TabStruct
  491.     {
  492.     Frame *frame, *pb;
  493.     struct TabStruct *next;
  494.     } Tab;
  495.  
  496. typedef struct TCStruct
  497.     {
  498.     Widget *WidgetData; // Do not move this item!  It must be first to match other controls.
  499.     Tab *FirstTab, *SelectedTab;
  500.     struct Border CustomFrameBorder; // The same for every tab except the points
  501.     short FramePoints[4];
  502.     int I_CALLBACK (* STORM_CALLBACK Callfn) (Frame*);
  503.     struct TCStruct *next;
  504.     } TabControl;
  505.  
  506. typedef struct
  507. {
  508.     int I_CALLBACK (* STORM_CALLBACK callfn) (Frame*);
  509.     int tabselected;
  510.     int I_CALLBACK (* STORM_CALLBACK framefn) (Frame*, short, short, short, void**);
  511. } TabControlExtension; // PRIVATE - only for use by FoxED
  512.  
  513. struct GuiList
  514.    {
  515.    int                        TotalElems, Width, Height;
  516.    BOOL                        Update, ListBox;
  517.    char                        *Title1, *Title2, *Title3;
  518.    struct ListElement    *First, *Last;
  519.    int                        TopShown, HighNum;
  520.    };
  521.  
  522. struct DDListBoxStruct
  523.    {
  524.     GuiWindow                *win;
  525.     ListBox                    *nlb;
  526.    int                        MaxHeight, TotalElems;
  527.    struct ListElement    *first;
  528.    int                        PopupWidth, PopupX, PopupY;
  529.    struct EditBoxStruct    *Parent;
  530.    };
  531.  
  532. typedef struct EditBoxStruct
  533.    {
  534.     Widget               *WidgetData; // Do not move this item!  It must be first to match other controls.
  535.    int                  len, Bcol, Tcol, type, dp, id;
  536.    char                 *buffer;
  537.    BOOL                 I_CALLBACK (* STORM_CALLBACK valifn)(struct EditBoxStruct*);
  538.    short                points[26], hidden;
  539.    BOOL                 enabled, OldStatus, SysStatus;
  540.    struct Border        lborder, dborder, arrow, bb1, bb2;
  541.    struct EditBoxStruct *next, *previous;
  542.    struct EditBoxStruct *NextAssociated, *PreviousAssociated;
  543.    struct DDListBoxStruct *list;
  544.     struct Gadget            editbox;
  545.     struct StringInfo    strinfo;
  546.     char                        *undobuffer;
  547.    } EditBox;
  548.  
  549. typedef struct EditBoxStruct DDListBox;
  550.  
  551. typedef struct OutputBoxStruct
  552.    {
  553.     Widget                         *WidgetData; // Do not move this item!  It must be first to match other controls.
  554.    GuiWindow                    *win;
  555.     int                            len, Bcol, Tcol, dp, id;
  556.    short                            points[20], hidden;
  557.    struct Border                lborder, dborder;
  558.     struct IntuiText            IText;
  559.     char                            *text;
  560.     struct TextAttr            *font;
  561.    struct OutputBoxStruct    *next, *previous;
  562.    } OutputBox;
  563.  
  564. struct MutexList
  565.     {
  566.     struct RBStruct *Mutex;
  567.     struct MutexList *Next;
  568.     };
  569.  
  570. typedef struct RBStruct
  571.     {
  572.     Widget *WidgetData; // Do not move this item!  It must be first to match other controls.
  573.     short BevelPoints[20], hidden;
  574.     struct Border BLight, BDark, sBDark, sBLight;
  575.     struct Gadget RBGad;
  576.     BOOL Active;
  577.    int I_CALLBACK (* STORM_CALLBACK Callfn) (struct RBStruct *);
  578.     struct MutexList *MList;
  579.     struct RBStruct *Next;
  580.     } RadioButton;
  581.  
  582. typedef struct TickBoxStruct
  583.     {
  584.     Widget *WidgetData; // Do not move this item!  It must be first to match other controls.
  585.     short BevelPoints[20], TickPoints[12], hidden;
  586.     struct Border BLight, BDark, sTick, nsTick;
  587.     struct Gadget TickBoxGad;
  588.     BOOL Active, Ticked;
  589.    int I_CALLBACK (* STORM_CALLBACK Callfn) (struct TickBoxStruct *);
  590.     struct TickBoxStruct *Next;
  591.     } TickBox;
  592.  
  593. typedef struct TimerStruct
  594.     {
  595.     Widget *WidgetData; // Do not move this item!  It must be first to match other controls.
  596.     long lasttrigger, timesecs, starttimesecs, pausetimesecs;
  597.     BOOL running, paused;
  598.     int I_CALLBACK (* STORM_CALLBACK Callfn) (struct TimerStruct *, long);
  599.     struct TimerStruct *NextTimer;
  600.     } Timer;
  601.  
  602. typedef struct PIStruct
  603.     {
  604.     Widget *WidgetData; // Do not move this item!  It must be first to match other controls.
  605.     GuiWindow *win;
  606.     struct Border light, dark;
  607.     short fillcol, BevelPoints[20], hidden;
  608.     int iprogress, max;
  609.     struct IntuiText progress;
  610.     struct PIStruct *Next;
  611.     } ProgressBar;
  612.  
  613. /******************
  614.     Progress Bars
  615. ******************/
  616.  
  617. EXTC ProgressBar* PROTOFOXLIB MakeProgressBar(REGA0 void *Parent, REGD0 int left, REGD1 int top, REGD2 int width,
  618.         REGD3 int height, REGD4 short fillcol, REGD5 short flags, REGA1 void *extension);
  619. EXTC void PROTOFOXLIB SetProgress(REGA0 ProgressBar *pb, REGD0 int progress);
  620. EXTC void PROTOFOXLIB SetProgressMax(REGA0 ProgressBar *pb, REGD0 int progressmax);
  621.  
  622.  
  623. /***********
  624.     Frames
  625. ***********/
  626.  
  627. EXTC Frame* PROTOFOXLIB MakeFrame(REGA0 void *Parent, REGA1 char *name, REGD0 int left, REGD1 int top, REGD2 int width, REGD3 int height,
  628.         REGA2 struct Border *cb, REGA3 int I_CALLBACK (*callfn) (Frame*, short, short, short, void**),
  629.         REGD4 short flags, REGD5 void *extension);
  630. void PROTOFOXLIB SetFrameDragPointer(REGA0 Frame *Fptr, REGA1 unsigned short *DragPointer, REGD0 int width, REGD1 int height, REGD2 int xoffset,
  631.         REGD3 int yoffset);
  632.  
  633.  
  634. /************
  635.     BitMaps
  636. ************/
  637.  
  638. EXTC GuiBitMap* PROTOFOXLIB LoadBitMap(REGA0 char *fname);
  639. EXTC BitMapInstance* PROTOFOXLIB ShowBitMap(REGA0 GuiBitMap *bm, REGA1 GuiWindow *w, REGD0 unsigned short x, REGD1 unsigned short y, REGD2 short flags);
  640. EXTC BOOL PROTOFOXLIB HideBitMap(REGA0 BitMapInstance *bmi);
  641. EXTC BOOL PROTOFOXLIB FreeGuiBitMap(REGA0 GuiBitMap *bm);
  642. EXTC GuiBitMap* PROTOFOXLIB ScaleBitMap(REGA0 GuiBitMap *source, REGD0 unsigned short destwidth, REGD1 unsigned short destheight);
  643. EXTC BOOL PROTOFOXLIB RedrawBitMap(REGA0 BitMapInstance *bmi);
  644. EXTC BOOL PROTOFOXLIB AttachBitMapToControl(REGA0 GuiBitMap *bm, REGA1 void *control, REGD0 short left, REGD1 short top, REGD2 short width,
  645.         REGD3 short height, REGD4 int flags);
  646. EXTC BOOL PROTOFOXLIB ScreenColoursFromILBM(REGA0 GuiScreen *sc, REGA1 char *fname);
  647.  
  648.  
  649. /***************
  650.     List Boxes
  651. ***************/
  652.  
  653. EXTC void PROTOFOXLIB SortListBox(REGA0 ListBox *p, REGD0 int flags, REGD1 int startnum, REGD2 BOOL refresh);
  654. EXTC void PROTOFOXLIB ClearListBoxTabStops(REGA0 ListBox *nlb, REGD0 BOOL refresh);
  655. EXTC BOOL PROTOFOXLIB SetListBoxTabStopsArray(REGA0 ListBox *nlb, REGD0 BOOL refresh, REGD1 short num, REGA1 int *tabs);
  656. EXTC void PROTOFOXLIB SetListBoxTopNum(REGA0 ListBox *lb, REGD0 int num, REGD1 BOOL refresh);
  657. EXTC void PROTOFOXLIB SetListBoxHiNum(REGA0 ListBox *lb, REGD0 int num, REGD1 BOOL refresh);
  658. EXTC void PROTOFOXLIB SetListBoxHiElem(REGA0 ListBox *lb, REGA1 ListBoxItem *item, REGD0 BOOL refresh);
  659. EXTC int PROTOFOXLIB NoTitles(REGA0 ListBox *lb);
  660. EXTC int PROTOFOXLIB NoLines(REGA0 ListBox *lb);
  661. EXTC int PROTOFOXLIB TopNum(REGA0 ListBox *lb);
  662. EXTC int PROTOFOXLIB HiNum(REGA0 ListBox *lb);
  663. EXTC ListBoxItem* PROTOFOXLIB HiElem(REGA0 ListBox *lb);
  664. EXTC char* PROTOFOXLIB HiText(REGA0 ListBox *lb);
  665. EXTC char* PROTOFOXLIB ListColumnText(REGA0 ListBox *lb, REGD0 int col);
  666. EXTC BOOL PROTOFOXLIB AddListBoxTitle(REGA0 ListBox *nlb, REGA1 char *title, REGD0 BOOL refresh);
  667. EXTC ListBoxItem* PROTOFOXLIB AddListBoxItem(REGA0 ListBox *nlb, REGA1 char *item, REGD0 BOOL refresh);
  668. EXTC ListBoxItem* PROTOFOXLIB ReplaceListBoxItem(REGA0 ListBox *nlb, REGA1 char *item, REGA2 ListBoxItem *OldItem, REGD0 BOOL refresh);
  669. EXTC ListBoxItem* PROTOFOXLIB InsertListBoxItem(REGA0 ListBox *nlb, REGA1 char *item, REGA2 ListBoxItem *after, REGD0 BOOL refresh);
  670. EXTC void PROTOFOXLIB ListBoxRefresh(REGA0 ListBox *lb);
  671. EXTC void PROTOFOXLIB ClearListBoxTitles(REGA0 ListBox *lb, REGD0 BOOL refresh);
  672. EXTC void PROTOFOXLIB ClearListBoxItems(REGA0 ListBox *lb, REGD0 BOOL refresh);
  673. EXTC int PROTOFOXLIB FindListText(REGA0 ListBox *lb, REGA1 char *text, REGD0 int reqcolumn);
  674. EXTC ListBox* PROTOFOXLIB MakeListBox(REGA0 void *Parent, REGD0 int left, REGD1 int top, REGD2 int width, REGD3 int height, REGD4 int lborder,
  675.         REGD5 int tborder, REGD6 int flags, REGA1 int I_CALLBACK (*Eventfn) (ListBox*, short, int, void**), REGA2 void *extension);
  676. EXTC void PROTOFOXLIB SetListBoxDragPointer(REGA0 ListBox *lb, REGA1 unsigned short *DragPointer, REGD0 int width, REGD1 int height,
  677.         REGD2 int xoffset, REGD3 int yoffset);
  678. EXTC ListBoxItem* PROTOFOXLIB ItemElem(REGA0 ListBox *lb, REGD0 int target);
  679.  
  680.  
  681. /******************
  682.     Tree Controls
  683. ******************/
  684.  
  685. EXTC TreeControl* PROTOFOXLIB MakeTreeControl(REGA0 void *Parent, REGD0 int left, REGD1 int top, REGD2 int width, REGD3 int height,
  686.         REGD4 int lborder, REGD5 int tborder, REGD6 int flags,
  687.         REGA1 int I_CALLBACK (*Eventfn) (TreeControl*, short, TreeItem*, void**), REGA2 void *extension);
  688. EXTC void PROTOFOXLIB SetTreeControlDragPointer(REGA0 TreeControl *tc, REGA1 unsigned short *DragPointer, REGD0 int width, REGD1 int height,
  689.         REGD2 int xoffset, REGD3 int yoffset);
  690. EXTC TreeItem* PROTOFOXLIB AddItem(REGA0 TreeControl *tc, REGA1 TreeItem *InsBefore, REGA2 TreeItem *Parent, REGA3 char *text,
  691.         REGD0 BOOL IsOpen, REGD1 GuiBitMap *bm, REGD2 void *ItemData);
  692. EXTC BOOL PROTOFOXLIB ItemIsOpen(REGA0 TreeItem *it);
  693. EXTC void PROTOFOXLIB RemoveItem(REGA0 TreeItem *ti);
  694. EXTC void PROTOFOXLIB OpenItem(REGA0 TreeItem *it);
  695. EXTC void PROTOFOXLIB CloseItem(REGA0 TreeItem *it);
  696. EXTC TreeItem* PROTOFOXLIB TCHiItem(REGA0 TreeControl *tc);
  697. EXTC char* PROTOFOXLIB TCHiText(REGA0 TreeControl *tc);
  698. EXTC void PROTOFOXLIB SetTreeControlHiItem(REGA0 TreeControl *tc, REGA1 TreeItem *HiItem, REGD0 BOOL refresh);
  699. EXTC void* PROTOFOXLIB ItemData(REGA0 TreeItem *ti);
  700. EXTC char* PROTOFOXLIB TCItemText(REGA0 TreeItem *ti);
  701. EXTC void PROTOFOXLIB ClearTreeControl(REGA0 TreeControl *tc);
  702. EXTC TreeItem* PROTOFOXLIB FindTreeItem(REGA0 TreeControl *tc, REGA1 char *text);
  703. EXTC TreeItem* PROTOFOXLIB ReplaceTCItem(REGA0 TreeItem *old, REGA1 char *text, REGA2 GuiBitMap *bm, REGA3 void *ItemData);
  704.  
  705. /*************************
  706.     Drop Down List Boxes
  707. *************************/
  708.  
  709. EXTC void PROTOFOXLIB ClearDDListBox(REGA0 DDListBox *l);
  710. EXTC BOOL PROTOFOXLIB RemoveFromDDListBox(REGA0 DDListBox *list, REGA1 char *str);
  711. EXTC BOOL PROTOFOXLIB AddToDDListBox(REGA0 DDListBox *list, REGA1 char *str);
  712. EXTC void PROTOFOXLIB SortDDListBox(REGA0 DDListBox *p, REGD0 int flags);
  713. EXTC BOOL PROTOFOXLIB SetDDListBoxPopup(REGA0 DDListBox *l, REGD0 int x, REGD1 int y, REGD2 int width, REGD3 int height);
  714. EXTC BOOL PROTOFOXLIB AssociateDDListBox(REGA0 DDListBox *l, REGA1 DDListBox *m);
  715. EXTC DDListBox* PROTOFOXLIB MakeSubDDListBox(REGA0 DDListBox *lb, REGA1 char *string, REGD0 int left, REGD1 int top, REGD2 int width,
  716.         REGD3 int height, REGD4 int id, REGA2 BOOL I_CALLBACK (*callfn)(DDListBox*), REGA3 void *extension);
  717. EXTC DDListBox* PROTOFOXLIB MakeDDListBox(REGA0 void *Parent, REGD0 int x, REGD1 int y, REGD2 int len, REGD3 int buflen,
  718.     REGD4 int MaxHeight, REGD5 int id, REGA1 BOOL I_CALLBACK (*callfn) (DDListBox*),
  719.     REGD6 long flags, REGA2 void *extension);       /* Tcol must be between 0 & 7 */
  720. EXTC BOOL PROTOFOXLIB SetDDListBoxText(REGA0 DDListBox *l, REGA1 char *c);
  721. EXTC char* PROTOFOXLIB GetDDListBoxText(REGA0 DDListBox *l);
  722. EXTC int PROTOFOXLIB GetDDListBoxID(REGA0 DDListBox *l);
  723.  
  724. /***************
  725.     Edit Boxes
  726. ***************/
  727.  
  728. EXTC void PROTOFOXLIB RefreshEditBox(REGA0 EditBox *p);
  729. EXTC BOOL PROTOFOXLIB SetEditBoxFocus(REGA0 EditBox *p);
  730. EXTC BOOL PROTOFOXLIB SetEditBoxCols(REGA0 EditBox *p, REGD0 int BorderCol, REGD1 int Bcol, REGD2 int Tcol);
  731. EXTC char* PROTOFOXLIB GetEditBoxText(REGA0 EditBox *p);
  732. EXTC int PROTOFOXLIB GetEditBoxInt(REGA0 EditBox *p);
  733. EXTC double PROTOFOXLIB GetEditBoxDouble(REGA0 EditBox *p);
  734. EXTC BOOL PROTOFOXLIB SetEditBoxText(REGA0 EditBox *p, REGA1 char *text);
  735. EXTC BOOL PROTOFOXLIB SetEditBoxInt(REGA0 EditBox *p, REGD0 int num);
  736. EXTC BOOL PROTOFOXLIB SetEditBoxDouble(REGA0 EditBox *p, REGD0 double num);
  737. EXTC BOOL PROTOFOXLIB SetEditBoxDP(REGA0 EditBox *p, REGD0 int num);
  738. EXTC EditBox* PROTOFOXLIB MakeEditBox(REGA0 void *Parent, REGD0 int x, REGD1 int y, REGD2 int len, REGD3 int buflen,
  739.         REGD4 int id, REGA1 BOOL I_CALLBACK (*callfn) (EditBox*), REGD5 long flags, REGA2 void *extension);
  740. EXTC int PROTOFOXLIB GetEditBoxID(REGA0 EditBox *p);
  741.  
  742.  
  743. /*******************
  744.         Menus
  745. *******************/
  746.  
  747. EXTC BOOL PROTOFOXLIB DisableWinMenus(REGA0 GuiWindow *win);
  748. EXTC BOOL PROTOFOXLIB EnableWinMenus(REGA0 GuiWindow *win);
  749. EXTC BOOL PROTOFOXLIB DisableMenu(REGA0 GuiWindow *win, REGA1 struct Menu *menu);
  750. EXTC BOOL PROTOFOXLIB EnableMenu(REGA0 GuiWindow *win, REGA1 struct Menu *menu);
  751. EXTC BOOL PROTOFOXLIB DisableMenuItem(REGA0 GuiWindow *win, REGA1 struct MenuItem *item);
  752. EXTC BOOL PROTOFOXLIB EnableMenuItem(REGA0 GuiWindow *win, REGA1 struct MenuItem *item);
  753. EXTC void PROTOFOXLIB SetWinMenuFn(REGA0 GuiWindow *win, REGA1 int I_CALLBACK (*fn) (GuiWindow*, struct MenuItem *));
  754. EXTC void PROTOFOXLIB ClearMenus(REGA0 GuiWindow *win);
  755. EXTC void PROTOFOXLIB ShareMenus(REGA0 GuiWindow *dest, REGA1 GuiWindow *source);
  756. EXTC struct Menu* PROTOFOXLIB AddMenu(REGA0 GuiWindow *win, REGA1 char *name, REGD0 int leftedge, REGD1 int enabled);
  757. EXTC struct MenuItem* PROTOFOXLIB AddMenuItem(REGA0 GuiWindow *win, REGA1 struct Menu *menu, REGA2 char *name, REGA3 char *selname,
  758.         REGD0 unsigned short flags, REGD1 int key, REGD2 int enabled, REGD3 int checkit, REGD4 int checked, REGD5 int menutoggle);
  759. EXTC struct MenuItem* PROTOFOXLIB AddSubMenuItem(REGA0 GuiWindow *win,
  760.         REGA1 struct MenuItem *menuitem, REGA2 char *name, REGA3 char *selname, REGD0 unsigned short flags,
  761.         REGD1 int key, REGD2 int enabled, REGD3 int checkit, REGD4 int checked, REGD5 int menutoggle);
  762. EXTC BOOL PROTOFOXLIB RemoveMenuItem(REGA0 GuiWindow *win, REGA1 struct MenuItem *item);
  763. EXTC BOOL PROTOFOXLIB IsMenuChecked(REGA0 struct MenuItem *mi);
  764. EXTC BOOL PROTOFOXLIB SetMenuChecked(REGA0 GuiWindow *win, REGA1 struct MenuItem *item, REGD0 BOOL checked);
  765.  
  766. /*******************
  767.         Windows
  768. *******************/
  769.  
  770. EXTC void PROTOFOXLIB WriteText(REGA0 GuiWindow *gw, REGA1 char *text, REGD0 int x, REGD1 int y);
  771. EXTC BOOL PROTOFOXLIB SleepPointer(REGA0 GuiWindow *win);
  772. EXTC void PROTOFOXLIB WakePointer(REGA0 GuiWindow *win);
  773. EXTC BOOL PROTOFOXLIB SetWindowLimits(REGA0 GuiWindow *gw, REGD0 long minwidth, REGD1 long minheight, REGD2 unsigned long maxwidth,
  774.         REGD3 unsigned long maxheight);
  775. EXTC GuiWindow* PROTOFOXLIB OpenGuiWindow(REGA0 void *Scr, REGD0 int Left, REGD1 int Top, REGD2 int Width, REGD3 int Height,
  776.         REGD4 int Dpen, REGD5 int Bpen, REGA1 char *Title, REGD6 int flags,
  777.         REGA2 int I_CALLBACK (*eventfn)(GuiWindow*, int, int, int, void*), REGA3 void *extension);
  778. EXTC BOOL PROTOFOXLIB ShowFileRequester(REGA0 GuiWindow *Wnd, REGA1 char *path, REGA2 char *fname, REGA3 char *pattern, REGD0 char
  779.     *title, REGD1 BOOL Save, REGD2 int I_CALLBACK (*callfn) (char*, char*));
  780. EXTC void PROTOFOXLIB SetFName(REGA0 char *fname);
  781. EXTC void PROTOFOXLIB SetPath(REGA0 char *path);
  782. EXTC void PROTOFOXLIB UpdateFList(void);
  783. EXTC void PROTOFOXLIB WinPrint(REGA0 GuiWindow *w, REGA1 char *str);
  784. EXTC void PROTOFOXLIB WinTab(REGA0 GuiWindow *w, REGD0 int x, REGD1 int y);
  785. EXTC void PROTOFOXLIB WinPrintTab(REGA0 GuiWindow *w, REGD0 int x, REGD1 int y, REGA1 char *str);
  786. EXTC void PROTOFOXLIB WinPrintCol(REGA0 GuiWindow *w, REGA1 char *str, REGD0 int col);
  787. EXTC void PROTOFOXLIB WinShowCursor(REGA0 GuiWindow *w);
  788. EXTC void PROTOFOXLIB WinHideCursor(REGA0 GuiWindow *w);
  789. EXTC void PROTOFOXLIB WinClear(REGA0 GuiWindow *w);
  790. EXTC void PROTOFOXLIB WinHome(REGA0 GuiWindow *w);
  791. EXTC void PROTOFOXLIB WinBlankToEOL(REGA0 GuiWindow *w);
  792. EXTC void PROTOFOXLIB WinWrapOn(REGA0 GuiWindow *w);
  793. EXTC void PROTOFOXLIB WinWrapOff(REGA0 GuiWindow *w);
  794.  
  795.  
  796. /*******************
  797.         Misc.
  798. *******************/
  799.  
  800. EXTC void PROTOFOXLIB UseSafeMallocs(void);
  801. EXTC void PROTOFOXLIB GuiLoop(void);
  802. EXTC short PROTOFOXLIB LibVersion(void);
  803. EXTC BOOL PROTOFOXLIB SetGuiPensFromPubScreen(REGA0 char *pub_screen_name);
  804. EXTC void PROTOFOXLIB SetGuiPens(REGD0 short hipen, REGD1 short lopen);
  805. EXTC BOOL PROTOFOXLIB ShowMessage(REGA0 GuiScreen *scr, REGA1 char *a, REGA2 char *b, REGA3 char *c, REGD0 int col);
  806. EXTC BOOL PROTOFOXLIB DestroyMessage(void);
  807. EXTC void PROTOFOXLIB SetPeriod(REGD0 int time);
  808. EXTC void PROTOFOXLIB SetDelay(REGD0 int time);
  809. EXTC void* PROTOFOXLIB GuiMalloc(REGD0 unsigned NoOfBytes, REGD1 unsigned long flags);
  810. EXTC BOOL PROTOFOXLIB WasGuiMallocd(REGA0 void *p);
  811. EXTC void PROTOFOXLIB GuiFreeMem(REGA0 void *p, REGD0 int line, REGA1 char *fname);
  812. EXTC void PROTOFOXLIB DrawLines(REGA0 GuiWindow *win, REGA1 short *points, REGD0 int count, REGD1 int col);
  813. EXTC short PROTOFOXLIB GuiMessage(REGA0 void *Scr, REGA1 char *text, REGA2 char *title, REGD0 int detail, REGD1 int block, REGD2 int flags);
  814. EXTC BOOL PROTOFOXLIB Hide(REGA0 void *Control);
  815. EXTC BOOL PROTOFOXLIB Show(REGA0 void *Control);
  816. EXTC void PROTOFOXLIB DisableControl(REGA0 void *Control, REGD0 BOOL refresh);
  817. EXTC void PROTOFOXLIB DisableM(REGD0 int ObjectType, REGA0 void *Parent, REGD1 BOOL refresh);
  818. EXTC void PROTOFOXLIB EnableControl(REGA0 void *Control, REGD0 BOOL refresh);
  819. EXTC void PROTOFOXLIB EnableM(REGD0 int ObjectType, REGA0 void *Parent, REGD1 BOOL refresh);
  820. EXTC BOOL PROTOFOXLIB Destroy(REGA0 void *Control, REGD0 BOOL refresh);
  821. EXTC void PROTOFOXLIB DestroyM(REGD0 int ObjectType, REGA0 void *Parent, REGD1 BOOL refresh);
  822. EXTC GuiWindow* PROTOFOXLIB GetWindow(REGA0 void *Control);
  823. EXTC BOOL PROTOFOXLIB RegisterGadget(REGA0 struct Gadget *gad, REGA1 GuiWindow *gadwin, REGA2 int I_CALLBACK (*gadfn)(struct Gadget*, struct IntuiMessage *));
  824. EXTC BOOL PROTOFOXLIB UnRegisterGadget(REGA0 struct Gadget *gad);
  825. EXTC struct Window* PROTOFOXLIB IntuiWindow(REGA0 GuiWindow *gw);
  826. EXTC void PROTOFOXLIB CheckMessages(void);
  827. EXTC unsigned long PROTOFOXLIB GetNextAvailableDisplayMode(REGD0 unsigned long previous);
  828. EXTC BOOL PROTOFOXLIB ShowDisplayList(REGA0 void *Scr, REGA1 char *title, REGD0 int DPen, REGD1 int BPen,
  829.         REGA2 unsigned long *displayModeID);
  830. EXTC int PROTOFOXLIB GetModeName(REGD0 unsigned long displaymode, REGA0 char *buffer, REGD1 int buflen);
  831. EXTC BOOL PROTOFOXLIB GetModeSize(REGD0 unsigned long displaymode, REGA0 long *width, REGA1 long *height);
  832. EXTC long PROTOFOXLIB GuiTextLength(REGA0 char *text, REGA1 struct TextAttr *font);
  833. EXTC void PROTOFOXLIB GuiGetLastErr(REGA0 char *error, REGA1 char *file, REGA2 int *line);
  834. EXTC void PROTOFOXLIB SetDefaultCols(REGD0 int BorderCol, REGD1 int BackCol, REGD2 int TextCol);
  835. EXTC void PROTOFOXLIB SetDefaultFont(REGA0 char *name, REGD0 int size, REGD1 int style);
  836. EXTC void PROTOFOXLIB GetDefaultFontCopy(REGA0 char *fontname, REGD0 int bufsize, REGA1 int *height, REGA2 int *style);
  837.  
  838.  
  839. /*******************
  840.         Screens
  841. *******************/
  842.  
  843. EXTC GuiScreen* PROTOFOXLIB OpenGuiScreen(REGD0 int Depth, REGD1 int DPen, REGD2 int BPen, REGA0 char *Title,
  844.         REGA1 int I_CALLBACK (*LastWinFn)(GuiScreen *), REGD3 int flags, REGA2 char *PubName, REGD4 unsigned long DisplayID,
  845.         REGD5 int OverscanType, REGD6 UWORD *pens, REGA3 void *extension);
  846. EXTC struct Screen* PROTOFOXLIB GetScreenDetails(REGA0 void *scr, REGA1 unsigned long *mode, REGA2 int *depth, REGA3 char *fontname,
  847.         REGD0 int bufsize, REGD1 int *reqbufsize, REGD2 int *fontheight, REGD3 int *fontstyle, REGD4 UWORD *pens, REGD5 int pensarraysize);
  848. EXTC GuiScreen* PROTOFOXLIB ClonePublicScreen(REGD0 int mindepth, REGA3 UBYTE *pub_screen_name, REGA0 char *sScreenTitle,
  849.         REGA1 int I_CALLBACK (*LastWinFn)(GuiScreen *), REGD1 int flags, REGA2 char *new_pub_name, REGD5 int OverscanType,
  850.         REGD2 void *extension);
  851.  
  852. /*******************
  853.         Buttons
  854. *******************/
  855.  
  856. EXTC PushButton* PROTOFOXLIB MakeButton(REGA0 void *Parent, REGA1 char *name, REGD0 int left, REGD1 int top, REGD2 int
  857.    width, REGD3 int height, REGD4 int key, REGA2 struct Border *cb, REGA3 int
  858.    I_CALLBACK (*callfn) (PushButton*), REGD5 short flags, REGD6 void *extension);
  859.  
  860. /*******************
  861.     Output Boxes
  862. *******************/
  863.  
  864. EXTC void PROTOFOXLIB SetOutputBoxDP(REGA0 OutputBox *p, REGD0 int dp);
  865. EXTC void PROTOFOXLIB SetOutputBoxInt(REGA0 OutputBox *p, REGD0 int num);
  866. EXTC void PROTOFOXLIB SetOutputBoxDouble(REGA0 OutputBox *p, REGD0 double num);
  867. EXTC void PROTOFOXLIB SetOutputBoxText(REGA0 OutputBox *p, REGA1 char *text);
  868. EXTC void PROTOFOXLIB SetOutputBoxCols(REGA0 OutputBox *ob, REGD0 int Bcol, REGD1 int Tcol, REGD2 BOOL refresh);
  869. EXTC OutputBox* PROTOFOXLIB MakeOutputBox(REGA0 void *Parent, REGD0 int x, REGD1 int y, REGD2 int width, REGD3 int len,
  870.         REGD4 int id, REGA1 char *InitialValue, REGD5 long flags, REGA2 void *extension);
  871. EXTC int PROTOFOXLIB GetOutputBoxID(REGA0 OutputBox *o);
  872. EXTC OutputBox* PROTOFOXLIB SetPreText(REGA0 void *p, REGA1 char *t);
  873. EXTC OutputBox* PROTOFOXLIB SetPostText(REGA0 void *p, REGA1 char *t);
  874.  
  875. /********************
  876.     Boolean Gadgets
  877. ********************/
  878.  
  879. EXTC RadioButton* PROTOFOXLIB ActiveRadioButton(REGA0 RadioButton *rb);
  880. EXTC RadioButton* PROTOFOXLIB MakeRadioButton(REGA0 void *Parent, REGA1 RadioButton *MutEx, REGD0 int left, REGD1 int top, REGD2 int width,
  881.         REGD3 int height, REGD4 int fillcol, REGA2 int I_CALLBACK (*callfn) (RadioButton*), REGD5 int flags, REGA3 void *extension);
  882. EXTC BOOL PROTOFOXLIB SetTickBoxValue(REGA0 TickBox *tb, REGD0 BOOL value);
  883. EXTC BOOL PROTOFOXLIB TickBoxValue(REGA0 TickBox *tb);
  884. EXTC TickBox* PROTOFOXLIB MakeTickBox(REGA0 void *Parent, REGD0 int left, REGD1 int top, REGD2 int width, REGD3 int height,
  885.         REGA1 int I_CALLBACK (*callfn) (TickBox*), REGD4 int flags, REGA2 void *extension);
  886.  
  887. /***********
  888.     Timers
  889. ***********/
  890.  
  891. EXTC Timer* PROTOFOXLIB MakeTimer(REGD0 short flags, REGA0 int I_CALLBACK (*CallFn) (Timer *, long), REGA1 void *extension);
  892. EXTC void PROTOFOXLIB StartTimer(REGA0 Timer *t);
  893. EXTC void PROTOFOXLIB StopTimer(REGA0 Timer *t);
  894. EXTC void PROTOFOXLIB PauseTimer(REGA0 Timer *t);
  895. EXTC void PROTOFOXLIB UnpauseTimer(REGA0 Timer *t);
  896. EXTC void PROTOFOXLIB AddTime(REGA0 Timer *t, REGD0 long secs);
  897. EXTC void PROTOFOXLIB SetTime(REGA0 Timer *t, REGD0 long secs);
  898.  
  899. /*****************
  900.    Tab Controls
  901. *****************/
  902.  
  903. EXTC TabControl* PROTOFOXLIB MakeTabControlArray(REGA0 void *Parent, REGD0 int left, REGD1 int top, REGD2 int width, REGD3 int height,
  904.         REGD4 int tabheight, REGD5 short flags, REGA1 int *tabwidth, REGA2 char **caption,
  905.         REGA3 TabControlExtension *ext);
  906. EXTC Frame* PROTOFOXLIB TabControlFrame(REGA0 TabControl *tc, REGD0 int frameno);
  907.  
  908. /************
  909.    Signals
  910. ************/
  911.  
  912. void SetSignals(unsigned long mask, int (*fn)(unsigned long, void*), void *UserData);
  913. void AddSignals(unsigned long mask);
  914. void ClearSignals(unsigned long mask);
  915.  
  916. #ifdef __STORM__
  917.     EXTC void PROTOFOXLIB SetupSizeOutlineData(REGD0 int x, REGD1 int y, REGD2 int width, REGD3 int height, REGD4 int minwidth,
  918.             REGD5 int minheight);
  919. #endif
  920.